home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / tchk21 / read.me < prev    next >
Text File  |  1989-06-05  |  11KB  |  235 lines

  1. Last minute notes for TCHK 2.1:
  2.  
  3.   Just a couple of quick notes that didn't make it into the documentation.
  4.  
  5.     - The file list in the documentation is not accurate. Refer to the
  6.       file PACKING.LST for the most up to date list of files
  7.  
  8.     - TCHK 2.1 is distributed in 3 parts:
  9.  
  10.             TCHK21.ZIP      - Documentation, Library, Header and Support files
  11.             TCHK21EX.ZIP    - Examples for TCHK 2.1 (source and executables)
  12.             TCHK21NG.ZIP    - Norton Guide for TCHK 2.1
  13.  
  14.     - In addition to those benefits listed in the documentation,
  15.       registered users will also receive the source to the Norton Guide
  16.       for TCHK 2.1
  17.  
  18.     - The file TCHKS.CFG is a configuration file for TCHK for the command
  19.       line compiler. Since the .TC format for 2.0 is not compatible with
  20.       the 1.5 version, TCHKS.CFG is included for your convenience. Note
  21.       that TCHKS.CFG was created with Borland's utility TCCONFIG.EXE
  22.       operating on TCHKS.TC. The resulting file had all -D options removed
  23.       from it (Compiler Defines). See the documentation for the data types
  24.       byte, word and bboolean for more information.
  25.  
  26.     - TCHK 2.1 should work with Turbo C 1.5 as well as 2.0. The only
  27.       changes made from TC 1.5 to 2.0 were debugging and compiler/linker
  28.       speed. The actual libraries have not been changed (except for some
  29.       minor bug fixes). I have not personally tested this, but several
  30.       people have inquired and after telling them it should work I never
  31.       heard from them again. Borland did not change any object/library
  32.       file formats from 1.5 to 2.0, so everything should be kosher. Patches
  33.       for the 1.5 libraries still work with the 2.0 libraries, so TCHK
  34.       should be compatible also.
  35.  
  36.     - Due to some problems with the mouse on my system, I have not been
  37.       able to fully test all the mouse functions. Fortunately, the demo
  38.       was compiled before any of these problems started appearing, so
  39.       it should be fine. However, due to an oversight on my part,
  40.       the mouse functions are not fully documented. Each individual
  41.       function is documented, but programming a mouse in general is not
  42.       explained to my satisfaction. Microsoft Press has recently released
  43.       a book about mouse programming which I recommend for you serious
  44.       rodent fans. For those of you without MS's book, see the end of this
  45.       file for some general explanations of how the mouse works. By the
  46.       next release the mouse functions will be expanded to provide greater
  47.       support, especially during text modes since dealing with the cells
  48.       per character is annoying.
  49.  
  50.       Note that this is not intended as a mouse manual, but rather
  51.       a brief outline.
  52.  
  53.     - A full blown demo of pretty much all the features of TCHK is in
  54.       the works, but is not yet ready for distribution and will not be
  55.       found with TCHK 2.1. See the examples provided in TCHK21EX.ZIP for
  56.       some smaller samples.
  57.  
  58.     - Customized versions of TCHK for specialized applications can be
  59.       provided on request for a modest fee. Please contact me for further
  60.       information
  61.  
  62.  
  63.  
  64.         Howard Kapustein
  65.  
  66.         Author of TCHK
  67.  
  68.  
  69.  
  70.  
  71.  
  72. MOUSE INTERFACE
  73. ===============
  74.  
  75. I. Screen Modes
  76.  
  77.     The screen mode defines the number of pixels on the screen and the
  78.     types of objects that appear on the screen. The available screen
  79.     modes depend on the type of display adapter you have in your
  80.     computer. The following table lists these screen modes and adapters
  81.     that support them:
  82.                             Virtual                     
  83.             Display         Screen          Cell        Bits/Pixel
  84.     Mode    Adapter         (X x Y)         Size        (Graphics Modes)
  85.     --------------------------------------------------------------------
  86.      0      CGA,EGA,3270    640x200         16x8            --
  87.      1      CGA,EGA,3270    640x200         16x8            --
  88.      2      CGA,EGA,3270    640x200         8x8             --
  89.      3      CGA,EGA,3270    640x200         8x1             --
  90.      4      CGA,EGA,3270    640x200         2x1             2
  91.      5      CGA,EGA,3270    640x200         2x1             2
  92.      6      CGA,EGA,3270    640x200         1x1             1
  93.      7      MDA,EGA,3270    640x200         8x8             --
  94.      D      EGA             Not supported
  95.      E      EGA             640x200         1x1             1
  96.      F      EGA             640x350         1x1             1
  97.     *10     EGA             640x350         1x1             1
  98.      30     3270            720x350         1x1             1
  99.             Hercules        720x348         1x1             1
  100.  
  101.     Mode values are hex (0x...)
  102.     3270 = IBM All Points Addressable Graphics Adapter (3270 PC)
  103.  
  104.     The mouse software should support other video modes, but I only
  105.     have documentation for these modes. This is not intended to be a
  106.     mouse manual, just a brief outline.
  107.  
  108.     * = Mouse will not display properly in this mode on an EGA card
  109.         with only 64K RAM; 128K RAM is needed
  110.  
  111. II. Virtual Screen
  112.  
  113.     The mouse operates on the computer's screen as if it were a virtual
  114.     screen. The "Virtual Screen" column in the table above gives the
  115.     number of horizontal and vertical virtual points for each supported
  116.     screen mode. Whenever INT 0x10 is called to change the screen mode,
  117.     the mouse software intercepts the call and determines which virtual
  118.     screen to use. The mouse software also reads the screen mode and
  119.     chooses the appropriate virtual screen whenever ismouse() is called
  120.     to reset default parameters values in the mouse software.
  121.  
  122.     Regardless of the screen mode, the software uses a pair of virtual
  123.     screen coordinates to locate an object on the screen. Each pair of
  124.     coordinates defines a point on the virtual screen.
  125.  
  126.     Many mouse functions take virtual screen coordinates as input, or
  127.     return them as output. Whenever you refer to a pixel or character in
  128.     a mouse function, make sure that the horizontal and vertical
  129.     coordinates are the correct values for the given screen mode. If you
  130.     supply an incorrect value, the function rounds the value down before
  131.     continuing. The mouse functions always return correct vlaues for the
  132.     given screen mode.
  133.  
  134.     1. Graphics Modes 6, E, F, 10, 30 and Hercules
  135.  
  136.         Each point in the virtual screen has a one-to-one correspondence
  137.         with each pixel on the screen. The full range of coordinates in
  138.         the "Virtual Screen" column is permitted.
  139.  
  140.     2. Graphics Modes 4 and 5
  141.  
  142.         The screen has half the number of pixels that it has in the
  143.         other graphics modes. To compensate, the mouse software uses
  144.         only even-numbered horizontal coordinates. This means that every
  145.         other point in the virtual screen corresponds to a pixel.
  146.  
  147.     3. Text Modes 2,3 and 7
  148.  
  149.         Each character is an 8- by 8-pixel group (see the "Cell Size"
  150.         column in the table above).
  151.  
  152.         Because the mouse software cannot access individual pixels in a
  153.         character, it uses the coordinates of the pixel in the upper
  154.         left corner of the character for the character's location. Since
  155.         each character is an 8- by 8-pixel group, both the horizontal
  156.         and vertical coordinates are multiples of 8. On a standard 80
  157.         column by 25 line screen, the virtual coorindates will range
  158.         from 0,0 (upper left corner) to 632,192 (lower right corner).
  159.  
  160.     4. Text Modes 0 and 1
  161.  
  162.         Each character is a 16- by 8-pixel group (see the "Cell Size"
  163.         column in the table above). See II.3. ("Text Modes 2,3 and 7")
  164.         for more details.
  165.  
  166. III. Graphics Cursor "Hot Spot"
  167.  
  168.     Whenever a mouse functions refers to the graphics cursor location,
  169.     it gives the point on the virtual screen that lies directly under
  170.     the cursor's "hot spot". The hot spot is the point in the cursor
  171.     block that the mouse software uses to determine the cursor
  172.     coordinates. The coorindates can be within the range -16 to 16;
  173.     however, in modes 4 and 5, the horizontal coordinate must be an even
  174.     number. In all graphics modes, the coordinates are relative to the
  175.     upper left corner of the cursor block.
  176.  
  177. IV. Software Text Cursor
  178.  
  179.     Using MCursorText() the cursor in text modes can be changed. If the
  180.     software cursor is used, the 16 bits of screen data are illustrated
  181.     below:
  182.  
  183.       bit │ 15 │ 14      12 │ 11 │ 10       8 │ 7        0 │
  184.           ├────┼────────────┼────┼────────────┼────────────┤
  185.           │ b  │ background │ i  │ foreground │ character  │
  186.           └────┴────────────┴────┴────────────┴────────────┘
  187.  
  188.         b           = blink
  189.         background  = background color
  190.         i           = intensity
  191.         foreground  = foreground color
  192.         character   = ASCII character
  193.  
  194.     The high order byte is the attribute and the low order byte is the
  195.     ASCII character.
  196.  
  197.     The screen data is ANDed with the screen mask (parm1) and then XORed
  198.     with the cursor mask (parm2). See the MCursorText() call in
  199.     DEMOMOUS.C for an example.
  200.  
  201.     The text cursor does not have a hot spot.
  202.  
  203. V. Mouse Unit of Distance: The Mickey
  204.  
  205.     The mouse unit of distance is called a mickey, which is
  206.     approximately 1/200 of an inch.
  207.  
  208.     The number of pixels that the cursor moves does not have to
  209.     correspond one-to-one with the number of mickeys the track ball
  210.     rolls.
  211.  
  212. VI. Internal Cursor Flag
  213.  
  214.     The mouse software maintains an internal flag that determines when
  215.     the cursor should be displayed on the screen. The value of this flag
  216.     is always 0 or less.
  217.  
  218.         - When the flag is 0, the cursor is displayed
  219.         - When the flag is any other value, the cursor is hidden
  220.  
  221.     Application programs cannot access this flag directly. To change the
  222.     flag's value, the program must call MCursorOn() and MCursorOff(),
  223.     which increment and decrement the flag, respectively.
  224.  
  225.     Calling ismouse() resets the flag to -1 and hides the cursor.
  226.  
  227.     Your program can call either MCursorOn() or MCursorOff() any number
  228.     of times, but if it calls MCursorOff() it must call MCursorOn()
  229.     later on to restore the flag's previous value. For example, if the
  230.     cursor is visible and your program calls MCursorOff() five times,
  231.     you must call MCursorOn() five times for it to be visible again.
  232.  
  233.  
  234. - fini -
  235.